package com.liujun.spring4.demo.aop.aopproblem.solve;

/**
 * @author liujun
 * @version 0.0.1
 * @date 2018/09/30
 */
public class Waiter implements BeanSelfProxyAware {

  private Waiter waiter;

  @Override
  public void setSelfProxy(Object object) {
    this.waiter = (Waiter) object;
  }

  public void serverTo(String name) {
    System.out.println("waiter serving " + name + "....");

    System.out.println("invoke greetto");

    waiter.greetTo(name);
  }

  public void greetTo(String name) {
    System.out.println("waiter greet to  + " + name + "...");
  }
}
